<template>
    <div>
        <div class="index1">
            <div class="w1">
                <p>百科</p>
            </div>
            <div class="w2">
                <div class="w2_1" v-for="it,i in Encyclopediadata" :key="i">
                    <img :src="it.img" alt="">
                    <p>{{it.title}}</p>
                </div>
            </div>
            <div class="w3">
                <p>查看全部</p>
            </div>
        </div>
        <div class="index2">
            <div class="r1">
                <p>话题</p>
            </div>
            <div class="r2" v-for="i in 3" :key="i">
                <router-link to="/usercenter">
                <div class="r2_1">
                    <img src="https://img-static.mihoyo.com/avatar/avatar1.png" alt="">
                    <div class="r2_2">
                        <span>cdsdv</span>
                        <span>嘿嘿</span>
                    </div>
                </div>
                </router-link>
                <div class="plk">
                    <p>关注</p>
                </div>
            </div>
        </div>
        <div class="index3">
            <div class="y1">
                <p>帖子</p>
            </div>
            <div class="useTil" v-for="it,i in Postdata" :key="i">
                <div class="title1">
                    <div class="title1_1">
                        <router-link to="/usercenter"><img class="img1" :src="it.img1" width="30px" alt=""></router-link> 
                        <img class="img3" src="../../assets/img/v.png" alt="">
                        <router-link to="/usercenter"><span class="ti1" :title="it.name">{{it.name}}</span></router-link>
                        <span class="ti2">
                            <img class="img2" :src="it.grade" alt="">
                        </span>
                        <span class="ti3">{{it.time}}</span>
                    </div>
                    <!-- <div class="title1_2">
                        关注
                    </div> -->
                </div>
                <div class="title2">
                    <!-- <div class="ti1">官方</div> -->
                    <router-link to="/postdetails">
                        <div class="ti2">{{it.title}}</div>
                    </router-link>
                </div>
                <div class="title3">
                    {{it.brief}}
                </div>
                <div class="title4">
                    <div v-for="(item,i) in it.listImg" :key="i">
                        <!-- <img :src="item" alt=""> -->
                        <el-image :src="item" :preview-src-list="it.listImg"></el-image>
                    </div>
                </div>
                <div class="title5">
                    <div class="title5_1">
                        <div v-for="i in it.label" :key="i">{{i}}</div>
                    </div>
                    <div class="title5_2">
                        <div class="title5_2_1">
                            <i class="el-icon-view"></i>
                            <span>{{it.views}}</span>
                        </div>
                        <div class="title5_2_2">
                            <i class="el-icon-chat-dot-round"></i>
                            <span>{{it.comment}}</span>
                        </div>
                        <div class="title5_2_3">
                            <i class="el-icon-thumb"></i>
                            <span>{{it.give}}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            // 百科数据
            Encyclopediadata: [
                {id: 1, img: 'https://uploadstatic.mihoyo.com/ys-obc/2020/07/09/408757/f8d26d6a9ed0fcba7ab012e03650ea50_2876146447851098207.png', title: '丘丘图腾围栏1'},
                {id: 2, img: 'https://uploadstatic.mihoyo.com/ys-obc/2020/07/09/408757/f8d26d6a9ed0fcba7ab012e03650ea50_2876146447851098207.png', title: '丘丘图腾围栏2'},
                {id: 3, img: 'https://uploadstatic.mihoyo.com/ys-obc/2020/07/09/408757/f8d26d6a9ed0fcba7ab012e03650ea50_2876146447851098207.png', title: '丘丘图腾围栏3'}
            ],
            // 话题数据
            Topicdata: [
                {id: 1, img: 'https://upload-bbs.mihoyo.com/upload/2021/04/21/affd03b42eafef672eacc38647f20dde_4336963425049215104.png?x-oss-process=image/resize,s_150/quality,q_80/auto-orient,0/interlace,1/format,jpg', name: '丘丘梦工厂', title: 'v芬迪vi的四十比ubviufdbsiubusdh'},
                {id: 2, img: 'https://upload-bbs.mihoyo.com/upload/2021/04/21/affd03b42eafef672eacc38647f20dde_4336963425049215104.png?x-oss-process=image/resize,s_150/quality,q_80/auto-orient,0/interlace,1/format,jpg', name: '丘丘梦工厂', title: 'v芬迪vi的四十比ubviufdbsiubusdh'},
                {id: 3, img: 'https://upload-bbs.mihoyo.com/upload/2021/04/21/affd03b42eafef672eacc38647f20dde_4336963425049215104.png?x-oss-process=image/resize,s_150/quality,q_80/auto-orient,0/interlace,1/format,jpg', name: '丘丘梦工厂', title: 'v芬迪vi的四十比ubviufdbsiubusdh'}
            ],
            // 帖子数据
            Postdata: [
                {
                    id: 1,
                    img1: 'https://img-static.mihoyo.com/avatar/avatar10014.png',
                    icon: '../../assets/img/v.png',
                    name: '西风快报员',
                    grade: 'https://img-static.mihoyo.com/level/level16.png',
                    time: '22小时',
                    title: '[百货奇货]活动：开奇货匣得原石!',
                    brief: '常年你的GIF不覅u是非哦分工日工日个穷鬼·iOS v hi发vi的比赛v覅u百度f常年你的GIF不覅u是非哦分工日工日个穷鬼·iOS v hi发vi的比赛v覅u百度f常年你的GIF不覅u是非哦分工日工日个穷鬼·iOS v hi发vi的比赛v覅u百度f',
                    listImg: [
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg'
                    ],
                    label: ['你好uacdfssf','不好吧','太好啦'],
                    views: '168万+',
                    comment: '9800',
                    give: '16万+'
                },{
                    id: 2,
                    img1: 'https://img-static.mihoyo.com/avatar/avatar10014.png',
                    icon: '../../assets/img/v.png',
                    name: '西风快报员',
                    grade: 'https://img-static.mihoyo.com/level/level16.png',
                    time: '22小时',
                    title: '[百货奇货]活动：开奇货匣得原石!',
                    brief: '常年你的GIF不覅u是非哦分工日工日个穷鬼·iOS v hi发vi的比赛v覅u百度f常年你的GIF不覅u是非哦分工日工日个穷鬼·iOS v hi发vi的比赛v覅u百度f常年你的GIF不覅u是非哦分工日工日个穷鬼·iOS v hi发vi的比赛v覅u百度f',
                    listImg: [
                        'https://upload-bbs.mihoyo.com/upload/2022/03/30/5f1612a985b3c421e3298bc17618a43b.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/04/29/3fe57965ed348966dd93dfaba28da0f6.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/04/29/b20891f66c723d6c569c1e8f3447671e.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg',
                        'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg'
                    ],
                    label: ['你好uacdfssf','不好吧','太好啦'],
                    views: '168万+',
                    comment: '9800',
                    give: '16万+'
                }
            ]
        }
    }
}
</script>

<style lang="less" scoped>
    a {
        color: #999;
        text-decoration: none;
    }
    .index1 {
        // border: 1px solid red;
        margin-top: 20px;
        border-radius: 6px;
        background-color: #fff;
        padding: 10px;
        // display: flex;
        .w1 {
            // border: 1px solid red;
        }
        .w2 {
            // border: 1px solid red;
            padding-bottom: 20px;
            border-bottom: 1px solid #ccc;
            margin-top: -10px;
            display: flex;
            flex-wrap: wrap;
            // justify-content: center;
            .w2_1 {
                // border: 1px solid red;
                background-color: rgb(240, 240, 240);
                border-radius: 6px;
                margin-left: 10px;
                margin-top: 10px;
                display: flex;
                align-items: center;
                width: 330px;
                cursor: pointer;
                img {
                    object-fit: cover;
                    width: 40px;
                    height: 40px;
                    border-radius: 6px;
                }
                p {
                    margin-left: 10px;
                }
            }
        }
        .w3 {
            text-align: center;
            color: #999;
            cursor: pointer;
        }
    }
    .index2 {
        background-color: white;
        margin-top: 20px;
        border-radius: 6px;
        .r1 {
            // border-bottom: 1px solid #ccc;
            display: flex;
            align-items: center;
            p {
                margin-left: 10px;
                font-size: 16px;
            }
        }
        .r2 {
            padding: 10px;
            // border: 1px solid red;
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #ccc;
            .r2_1 {
                display: flex;
                align-items: center;
                img {
                    max-width: 60px;
                    border-radius: 50%;
                    cursor: pointer;
                }
                .r2_2 {
                    // border: 1px solid red;
                    margin-left: 10px;
                    span:nth-last-child(2):hover {
                        color: #00c3ff;
                    }
                    span:nth-last-child(2) {
                        font-size: 14px;
                        display: flex;
                        flex-wrap: wrap;
                        color: #666;
                        cursor: pointer;
                    }
                    span:nth-last-child(1) {
                        font-size: 14px;
                        display: flex;
                        flex-wrap: wrap;
                        color: #999;
                    }
                }
            }
            .plk {
                // border: 1px solid red;
                margin-right: 30px;
                p {
                    // border: 1px solid red;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 20px;
                    background-color: #00c3ff;
                    color: white;
                    height: 26px;
                    width: 60px;
                    cursor: pointer;
                    font-size: 13px;
                }
            }
        }
    }
    .index3 {
        // border: 1px solid red;
        margin-top: 20px;
        border-radius: 6px;
        background-color: #fff;
        .y1 {
            display: flex;
            align-items: center;
            p {
                margin-left: 10px;
            }
        }
        .useTil:hover {
            .ti2 {
                color: #00c3ff;
            }
        }
        .useTil {
            // border: 1px solid red;
            border-bottom: 1px solid #999;
            margin-top: 6px;
            cursor: pointer;
            width: 96%;
            padding: 3px;
            .title1 {
                margin-top: 10px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                .title1_1 {
                    display: flex;
                    align-items: center;
                    position: relative;
                    .img1 {
                        border-radius: 50%;
                        cursor: pointer;
                    }
                    .img3 {
                        max-width: 9px;
                        position: absolute;
                        margin-left: 22px;
                        margin-top: 20px;
                        cursor: pointer;
                    }
                    span {
                        margin-left: 6px;
                    }
                    // i {
                    //     color: white;
                    //     background-color: yellow;
                    //     border-radius: 20px;
                    //     font-size: 6px;
                    //     position: absolute;
                    //     margin-left: 22px;
                    //     margin-top: 20px;
                    //     cursor: pointer;
                    // }
                    .ti1 {
                        font-size: 10px;
                        cursor: pointer;
                    }
                    .ti1:hover {
                        font-size: 10px;
                        color: #00c3ff;
                        cursor: pointer;
                    }
                    .ti2 {
                        .img2 {
                            max-width: 30px;
                        }
                    }
                    .ti3 {
                        color: #999;
                        font-size: 10px;
                    }
                }
                // .title1_2 {
                //     width: 10%;
                //     display: flex;
                //     align-items: center;
                //     justify-content: center;
                //     font-size: 15px;
                //     color: white;
                //     height: 23px;
                //     background-color: #00c3ff;
                //     border-radius: 20px;
                //     cursor: pointer;
                // }
            }
            .title2 {
                margin-top: 10px;
                display: flex;
                align-items: center;
                // .ti1 {
                //     width: 35px;
                //     text-align: center;
                //     background-color: #00c3ff;
                //     font-size: 15px;
                //     color: white;
                // }
                .ti2 {
                    margin-left: 6px;
                    font-size: 15px;
                    font-weight: bolder;
                }
                .ti2:hover {
                    color: #00c3ff;
                    cursor: pointer;
                }
            }
            .title3 {
                margin-top: 5px;
                color: #999;
                font-size: 13px;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 1;
                overflow: hidden;
            }
            .title4 {
                margin-top: 6px;
                display: flex;
                flex-wrap: wrap;
                .el-image {
                        margin-left: -10px;
                        min-width: 35%;
                        vertical-align: middle;
                        border-radius: 6px;
                        height: 80px;
                        margin: 10px;
                }
            }
            .title5 {
                display: flex;
                align-items: center;
                justify-content: space-between;
                .title5_1 {
                    display: flex;
                    div {
                        margin-left: 10px;
                        padding: 5px;
                        font-size: 10px;
                        border-radius: 20px;
                        background-color: rgb(236, 233, 233);
                    }
                }
                .title5_2 {
                    display: flex;
                    color: #999;
                    span {
                        // color: #999;
                        font-size: 10px;
                        display: flex;
                    }
                    i {
                        font-size: 20px;
                    }
                    .title5_2_1 {
                        margin-right: 10px;
                        display: flex;
                        align-items: center;
                    }
                    .title5_2_2 {
                        margin-right: 10px;
                        display: flex;
                        align-items: center;
                    }
                    .title5_2_3 {
                        margin-right: 10px;
                        display: flex;
                        align-items: center;
                    }
                }
            }
        }
    }
</style>